package cn.newhopedairy.delivery;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * 入口类
 *
 * 备注：
 * 1. 因为common子项目不同于领域子项目的包路径，所以@SpringBootApplication注解添加scanBasePackages在上一层包中扫描
 * 2. @EnableFeignClients注解需要指明引用哪些服务的FeignClient包，明确服务间依赖关系
 *
 * @author Neo.Li
 * @date 2020-09-30 21:19
 */
@EnableDiscoveryClient
@SpringBootApplication(scanBasePackages = {"cn.newhopedairy"})
@EnableFeignClients(basePackages = {"cn.newhopedairy.order.client"})
@EnableCaching
@EnableAsync
@MapperScan("cn.newhopedairy.delivery.infrastructure.db.mapper")
public class DeliveryApplication {
	public static void main(String[] args) {
		SpringApplication.run(DeliveryApplication.class, args);
	}

}